package com.woniu.Test;

/**
 * 链表的节点类
 *
 * @author WenXin
 * @version 1.0
 * @description: TODO
 * @date 2022/8/27 14:49
 */
public class Node {
    //节点的编号
    public int NodeNum;
    //节点的标识名
    public String NodeName;
    //指向的下一个节点
    public Node next;

    public Node(int nodeNum, String nodeName) {
        NodeNum = nodeNum;
        NodeName = nodeName;
    }

    public int getNodeNum() {
        return NodeNum;
    }

    public void setNodeNum(int nodeNum) {
        NodeNum = nodeNum;
    }

    public String getNodeName() {
        return NodeName;
    }

    public void setNodeName(String nodeName) {
        NodeName = nodeName;
    }

    public Node getNext() {
        return next;
    }

    public void setNext(Node next) {
        this.next = next;
    }

    public Node() {
    }

    public Node(int nodeNum, String nodeName, Node next) {
        NodeNum = nodeNum;
        NodeName = nodeName;
        this.next = next;
    }

    @Override
    public String toString() {
        return "Node{" +
                "NodeNum=" + NodeNum +
                ", NodeName='" + NodeName + '\'' +
                ", next=" + next +
                '}';
    }
}
